package com.sishu.njrtsdms.domain.dto;

import com.sishu.njrtsdms.annotation.ValidDateTime;
import com.sishu.njrtsdms.annotation.ValidYear;
import com.sishu.njrtsdms.domain.core.Groups;
import jakarta.validation.constraints.NotNull;
import lombok.Builder;
import org.jooq.types.ULong;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.time.Year;

/**
 * 重点建设项目申报归属年度信息配置传输类
 *
 * @param tcpDbycId            配置主键id
 * @param belongYear           所属年度
 * @param declareBeginDateTime 申报起始时间
 * @param declareEndDateTime   申报截止日期
 * @param remark               备注
 */
@Builder
public record TcpDeclareBelongYearConfigDTO(

        @NotNull(groups = {Groups.Update.class}, message = "修改配置信息时配置id不可为空")
        ULong tcpDbycId,
        @NotNull(groups = {Groups.Add.class}, message = "配置信息归属年度不可为空")
        @ValidYear(groups = {Groups.Add.class})
        Year belongYear,
        @NotNull(groups = {Groups.Add.class},
                message = "申报起始日期时间不可为空")
        @ValidDateTime(groups = {Groups.Add.class})
        LocalDateTime declareBeginDateTime,
        @NotNull(groups = {Groups.Add.class},
                message = "申报截止日期时间不可为空")
        @ValidDateTime(groups = {Groups.Add.class})
        LocalDateTime declareEndDateTime,
        @NotNull(groups = {Groups.Add.class},
                message = "绩点可分配起始日期时间不可为空")
        @ValidDateTime(groups = {Groups.Add.class})
        LocalDateTime gpaAssignableBeginDateTime,
        @NotNull(groups = {Groups.Add.class},
                message = "绩点可分配起始日期时间不可为空")
        @ValidDateTime(groups = {Groups.Add.class})
        LocalDateTime gpaAssignableEndDateTime,

        String remark

) implements Serializable {
}
